//
//  HorizonScrollSubView.m
//  ScrollConnectDemo
//
//  Created by Glen Eller on 2017/11/20.
//  Copyright © 2017年 none. All rights reserved.
//

#import "HorizonScrollSubView.h"

@interface HorizonScrollSubView()

@property (nonatomic, strong) UILabel *showLabel;

@end

@implementation HorizonScrollSubView

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        [self addSubview:self.showLabel];
    }
    return self;
}

- (void)setShowStr:(NSString *)showStr
{
    _showStr = showStr;
    self.showLabel.text = showStr;
}

- (UILabel *)showLabel
{
    if (!_showLabel) {
        _showLabel = [[UILabel alloc] initWithFrame:self.bounds];
        _showLabel.backgroundColor = [UIColor cyanColor];
        _showLabel.textAlignment = NSTextAlignmentCenter;
    }
    return _showLabel;
}

@end
